package dao

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	Name    string  `gorm:"varchar(20);not null;comment:手机品牌"`
	PriceId int     `gorm:"int(1);not null;comment:手机价格ID"`
	Price   float64 `gorm:"decimal(10,2);not null;comment:手机价格"`
	Size    int     `gorm:"int(5);not null;comment:手机容量"`
	Buy     int     `gorm:"int(1);default:1;comment:购买渠道 1-转转 2-京东"`
	Old     int     `gorm:"int(2);not null;comment:物品成色 99新 5新"`
	Status  string  `gorm:"varchar(20);default:2;comment:购买状态 已售罄 2-未售罄"`
}

type Price struct {
	//gorm.Model
	PriceId int     `gorm:"int(1);not null;comment:手机价格ID"`
	Price   float64 `gorm:"decimal(10,2);not null;comment:手机价格1"`
}

// 闲置表
type Would struct {
	gorm.Model
	GoodsId int     `gorm:"int(5);not null;comment:自己商品ID"`
	Name    string  `gorm:"varchar(20);not null;comment:手机品牌"`
	Price   float64 `gorm:"decimal(10,2);not null;comment:手机价格"`
}
